<template>
  <div class="auto" style="margin-top: 10px;border: 1px solid #F2F6FA;">
    <criteria v-ref:criteria>
      <div novalidate class="form-inline" partial>
        <p class="flex-between bg-info" style="padding: 8px;">
          <span>缴费查询</span>
          <span class="btn btn-link add-postition" @click="$parent.clear()">清空查询条件</span>
        </p>
        <div class="form-group">
          <label>小区名称</label>
          <input  type="text" class="form-control" v-model="model.f_phone"
          condition="f_phone = '{}'"
          :size="model.f_phone ? model.f_phone.length : 1">
        </div>
        <div class="form-group">
          <label>小区名称</label>
          <input  type="text" class="form-control" v-model="model.f_phone"
          condition="f_phone = '{}'"
          :size="model.f_phone ? model.f_phone.length : 1">
        </div>
      </div>
    </criteria>
  </div>
</template>

<script>
export default {
  title: '收费查询条件',
  methods: {
    getArgs () {
      return this.$refs.criteria.search()
    },
    // 清空所有查询条件
    clear () {
      Object.keys(this.$refs.criteria.model).forEach((key) => {
        this.$refs.criteria.model[key] = ''
      })
    }
  }
}
</script>
